package com.example.designpatterns.adapter.objectadapter;

import com.example.designpatterns.adapter.classadapter.OurFriend;

/**
 * 万物拟人适配器(Adaper)角色
 */
public class AnimalFriendAdaper implements OurFriend {
    private IAnimal animal;

    public AnimalFriendAdaper(IAnimal animal) {
        this.animal = animal;
    }

    @Override
    public void speak() {
        animal.makeSound();
    }
}
